<?php
/**
 * @package Flipper Open Source New Generation Blogging
 * @author Flipper Team <code@flipper.com>
 * @copyright Flipper Inc , 2011
 * @version 1.0
 * @name Flipper Functions
 */

if ( ! defined('Flipper')) exit('Access allowed');

/*** require Flipper Exception file ***/

    require SYS_PATH.SP.'core'.SP.'fp_exception'.EXP;
    

 function load_class ( $class, $directory = 'libraries', $prefix = 'fl_' )
 {

     $library_folder = array(APP_PATH,SYS_PATH);
     foreach($library_folder as $path)
     {
         $class_name = $prefix.$class;
         $class_file = $path.SP.$directory.SP.$class_name.EXP;
         if(file_exists($class_file))
         {
             require $class_file;

             if(class_exists($class_name))
             {
                    // Put here code
             } else
             {
                 Exception::Error(1001);
             }

         } else
         {

             Exception::Error(1002);

         }
     }

 }


 function load_config($config_file,$name)
 {
     
 }

?>
